<div style="">

 {if isset($unit)}
   {if $unit == 'Kitchen'}
       {if isset($photos)}
           {if $photos.count > 0}
               {foreach from=$photos.data item=photo}
                   <div class="item pro_wrapper pro_pad_port">
                       <a class="pro_image_style3 pro_image_with_capt lightbox-image" data-gal="prettyPhoto[gallery]" href="{$photo.link}">
                           <img alt="" src="{$photo.link_sm}" style="opacity: 1;" />
                           <span></span>
                       </a>

                       <p class="first">{$photo.title}</p>
                       <p class="second">{$photo.text}</p>

                   </div>
               {/foreach}
           {/if}
       {/if}
   {elseif $unit == 'Hall'}
       {if isset($photos)}
           {if $photos.count > 0}
               {foreach from=$photos.data item=photo}
                   <div class="item pro_wrapper pro_pad_port">
                       <a class="pro_image_style3 pro_image_with_capt lightbox-image" data-gal="prettyPhoto[gallery]" href="{$photo.link}">
                           <img alt="" src="{$photo.link_sm}" style="opacity: 1;" />
                           <span></span>
                       </a>

                       <p class="first">{$photo.title}</p>
                       <p class="second">{$photo.text}</p>

                   </div>
               {/foreach}
           {/if}
       {/if}
   {/if}
 {/if}

</div>